from hominin.publications.models import Author, Paper, Book
from django.contrib import admin

class AuthorAdmin(admin.ModelAdmin):
	list_display = ['last_name', 'first_name']
	search_fields = ['first_name', 'last_name', 'full_name']
	prepopulated_fields = {
		'full_name': ('first_name', 'last_name')
	}

admin.site.register(Author, AuthorAdmin)

class PaperAdmin(admin.ModelAdmin):
	list_display = ('title', 'journal', 'publication_date')

admin.site.register(Paper, PaperAdmin)

admin.site.register(Book)


